package string;

public class StringBuilderDemo {
    public static void main(String[] args) {
        String s = "a";
        StringBuilder builder = new StringBuilder(s);
        for (int i = 0; i < 10000000; i++) {
            builder.append(i);
        }
        System.out.println("1");






















        /*String str = "学习java";
        StringBuilder builder = new StringBuilder(str);
        builder.append(",为了找到好工作");
        System.out.println(builder);
        builder.replace(7,14,"为了赚钱");
        System.out.println(builder);

        //delete():删除部分内容
        builder.delete(0,6);
        System.out.println(builder);

        //insert（）插入内容
        builder.insert(0,"活着");
        System.out.println(builder);
*/

        /*StringBuilder builder = new StringBuilder("abc");
        String str = "abc";
        StringBuilder builder1 = new StringBuilder(str);
        String str1 = builder1.toString();*/
    }
}
